//
const createError = require("http-errors");
//
const test = function(req,res,next){
    try {
        console.log(req.headers);
        console.log(req.cookies);
        let { name="---", age="000"} = req.body;
        res.send({
            name,
            age
        });
        
        next();
    } catch (error) {
        next(createError());  
    }
};
//
//
module.exports = {
    path:"/",
    "POST /test":test
};